#include<iostream>
#include<cstring>
#include<iomanip>
using namespace std;
class CVector {
private:
	int* data;
	int n;
public:
	CVector();
	void print();
	CVector(int n1, int* a);
	void set(int n1, int* a);
	int* getdata() {
		return data;
	}
	int getn() {
		return n;
	}
	float Average();
	~CVector();
};
CVector::CVector() {
	n = 5;
	data = new int[n];
	for (int i = 0; i < n; i++) {
		data[i] = i;
	}
}
CVector::CVector(int n1, int* a) {
	n = n1;
	data = new int[n1];
	for (int i = 0; i < n1; i++) {
		data[i] = a[i];
	}
}
void CVector::set(int n1, int* a) {
	n = n1;
	data = new int[n1];
	for (int i = 0; i < n1; i++) {
		data[i] = a[i];
	}
}
void CVector::print() {
	for (int i = 0; i < n; i++) {
		if (i == n - 1) {
			cout << data[i] << endl;
		}
		else {
			cout << data[i] << ' ';
		}
	}
}
float CVector::Average() {
	float average = 0;
	for (int i = 0; i < n; i++) {
		average += (float)data[i] / n;
	}
	return average;
}
CVector::~CVector() {
	delete[] data;
}
class CStudent {
private:
	string name;
	CVector score;
public:
	CStudent(string name1, int n1, int* a);
	void print();
};
CStudent::CStudent(string name1, int n1, int* a) {
	name = name1;
	score.set(n1, a);
}
void CStudent::print() {
	cout << name << ' ';
	for (int i = 0; i < score.getn(); i++) {
		cout << score.getdata()[i] << ' ';
	}
	cout << fixed << setprecision(2) << score.Average() << endl;
}
int main()
{
	string name1;
	int n;
	while (cin >> name1) {
		cin >> n;
		int* a = new int[n];
		for (int i = 0; i < n; i++) {
			cin >> a[i];
		}
		CVector C(n, a);
		CStudent S(name1, n, a);
		S.print();
	}
	return 0;
}